import java.util.Scanner;


public class FibonacciRecursion {
    public static int fib(int n){
        if(n == 1){
            return 0;
        }
        if(n == 2){
            return 1;
        }
        int tmp = fib(n-1) + fib(n-2);
        return tmp;
    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int nn = fib(n);
        System.out.println(nn);
    }
}
